package com.x.ant.service;

import com.x.ant.dao.ChargePolicyDao;
import com.x.ant.model.ChargePolicy;
import com.x.framework.exception.BusinessException;
import com.x.framework.exception.ExceptionCode;
import com.x.framework.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class ChargePolicyService extends BaseService {
    @Autowired
    private ChargePolicyDao chargePolicyDao;

    public List<ChargePolicy> selectChargePolicyList(ChargePolicy chargePolicy) {
        try {
            return chargePolicyDao.selectChargePolicyList(chargePolicy);
        } catch (Exception e){
            throw new BusinessException(ExceptionCode.EXCEPTION_CODE0000, e);
        }
    }
}
